list1 = [10, 20, 30, 20, 40, 50]
s1 = {100, 300, 200, 500}
t1 = ('a', 'b', 'c', 'd', 'e')

"""
转换函数不影响原来的数据
"""

# tuple(): 转换成元组
print(tuple(list1))  # (10, 20, 30,20, 40, 50)
print(tuple(s1))  # (100,300,200,500)

# list()：转换成列表
print(list(s1))  # [100,300,200,500]
print(list(t1))  # ['a','b','c','d','e']

# set()：转换成集合
print(set(list1))  # {40, 10, 50, 20, 30}
print(set(t1))  # {'d', 'b', 'e', 'c', 'a'}